package com.CusterRelSys.service.impl;

import com.CusterRelSys.entity.BasDict;
import com.CusterRelSys.mapper.DictMapperDy;
import com.CusterRelSys.service.DictServiceDy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dylx on 2017/12/1.
 */
@Service
public class DictServiceimplDy implements DictServiceDy{
@Autowired
DictMapperDy dictMapperDy;
    @Override
    public List<BasDict> selectAll() {
        List<BasDict> list=dictMapperDy.selectAll();
        return list;
    }

    @Override
    public BasDict selectByNo(Integer dict_id) {
        BasDict basDict=dictMapperDy.selectByNo(dict_id);
        return basDict;
    }

    @Override
    public Boolean deleteById(Integer dict_id) {
        Boolean boo=dictMapperDy.deleteById(dict_id);
        return boo;
    }

    @Override
    public List<BasDict> selectByType(String dicttype) {
        List<BasDict> list1=dictMapperDy.selectByType(dicttype);
        return list1;
    }

    @Override
    public List<BasDict> selectByItem(String dictitem) {
        List<BasDict> list2=dictMapperDy.selectByItem(dictitem);
        return list2;
    }

    @Override
    public List<BasDict> selectByValue(String dictvalue) {
        System.out.println("44444");
        List<BasDict> list3=dictMapperDy.selectByValue(dictvalue);
        return list3;
    }

    @Override
    public int addAll(BasDict basDict) {
        int a=dictMapperDy.addAll(basDict);
        System.out.println(a);
        return a;
    }

    @Override
    public int updateAll(BasDict basDict) {
        int a=dictMapperDy.updateAll(basDict);
        return a;
    }
}
